package helen.core.tools.gridcontrol;

import android.app.Activity;
import android.content.Context;
import android.util.DisplayMetrics;
import android.widget.TableRow;

public abstract class AddRow {


	protected Context context;

	protected int HeadHeight = 30; 
	public int[] HeadColumeWidth;
	protected int RowHeight=30;
	protected double scale=1.0;

	public AddRow(Context context) {
		this.context = context;
		getScale();//��ȡ�����λת��ΪDP
	}
	abstract  public TableRow addTableRow();

	/*
	 * ����tabRow���ø߶�
	 */
	public void setRowHeight(int RowHeight){
		this.RowHeight= RowHeight;	
	}
	public void setHeadRowHeight(int HeadHeight){
		this.HeadHeight= HeadHeight;
	}

	/*
	 * ���ñ�ͷ�и�
	 */  
	public void setHeadColWidth(int[] HeadColumeWidth){
		this.HeadColumeWidth= HeadColumeWidth;

	}

	private void getScale(){//��ȡ����
		DisplayMetrics wldm = new DisplayMetrics();
		((Activity) this.context).getWindowManager().getDefaultDisplay().getMetrics(wldm);
		this.scale= wldm.densityDpi/160;//��ȡ�����λת��ΪDP
	}
}